package com.share.mapper;

import com.share.domain.User;
import com.share.provider.UserProvider;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * author:caifan
 * date:2019/5/20
 */
//@Mapper
public interface UserMapper {

    @Select("select * from user where username=#{username}")
    List<User> listByUsername(@Param("username") String username);

    @SelectProvider(type = UserProvider.class, method = "getUserByCardNo")
    User byCardNo(@Param("cardNo")String cardNo);

    @InsertProvider(type = UserProvider.class, method = "saveUser")
    int saveUser(User user);

    @SelectProvider(type = UserProvider.class, method = "listByEmail")
    List<User> listByEmail(@Param("emailList")List<String> emailList);
}
